<?php
header("Content-type: application/octet-stream");
header("Content-Disposition: attachment; filename=exceldata.xls");
header("Pragma: no-cache");
header("Expires: 0");
?> 
<table border="1" cellpadding="3" cellspacing="0" width="100%" style=" border-collapse: collapse;" class="record">
                <tr align="center">
                    <td colspan="7" height="25">Laporan Account Bank</td>
                </tr>
                <tr align="center">
                    <td>Kode Bank</td>
                    <td>Nama Bank</td>
                    <td>No Rekening</td>
                    <td>Saldo Awal</td>
                    <td>Uang Masuk</td>
                    <td>Uang Keluar</td>
                    <td>Saldo Akhir</td>
                </tr>
                <?php 
					foreach($data as $items) 
					{
				?> 
                <tr class="cellDefault">
                    <td><?php echo $items->KodeBank;?></td>
                    <td><?php echo $items->Bankname;?></td>
                    <td><?php echo $items->NoRekening;?></td>
                    <td><?php echo $items->SaldoAwal;?></td>
                    <td><?php echo $items->Uangmasuk;?></td>
                    <td><?php echo $items->Uangkeluar;?></td>
                    <td><?php echo $items->SaldoAkhir;?></td>
                </tr>
                <?php } ?>
            </table> 